package com.sunshine.androidjavapractise.app;

import android.app.Application;

import com.sunshine.androidjavapractise.util.StringUtil;
import com.zhouyou.http.EasyHttp;

public class MyApplication extends Application {
//    private DaoSession mDaoSession;

    @Override
    public void onCreate() {
        super.onCreate();
//        initGreenDao();
        initHttp();
        testStr();
    }

//    private void initGreenDao() {
//        DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(this, "test.db");
//        SQLiteDatabase database = helper.getWritableDatabase();
//        DaoMaster daoMaster = new DaoMaster(database);
//        mDaoSession = daoMaster.newSession();
//    }
//
//    public DaoSession getDaoSession() {
//        return mDaoSession;
//    }

    private void initHttp() {
        EasyHttp.init(this);
        EasyHttp.getInstance().setConnectTimeout(1000 * 5);
    }

    private void testStr() {
        StringUtil.getTrimString("hello world ");
    }
}
